﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Web.Mvc;

namespace ViewModel
{
    [DataContract]
    public class AdmColListModel
    {

        [Display(Name = "ID")]
        public int ID { get; set; }

        [Display(Name = "姓名")]
        public string Name { get; set; }

        [Display(Name = "路径")]
        public string Url { get; set; }

        [Display(Name = "小类别")]
        public string SmallClass { get; set; }

        [Display(Name = "排序")]
        public int OrderBy { get; set; }
    }

    [DataContract]
    public class AdmColUpdateModel
    {

        [Display(Name = "描述")]
        public string Descript { get; set; }

        [Required(ErrorMessage = "请输入名字")]
        [Display(Name = "名字")]
        public string Name { get; set; }

        [Required(ErrorMessage = "请输入路径")]
        [Display(Name = "路径")]
        public string Url { get; set; }

        [Display(Name = "小类别")]
        public string SmallClass { get; set; }

        [Required(ErrorMessage = "请输入等级")]
        [Display(Name = "等级")]
        public byte? ClassLevel { get; set; }

        [Display(Name = "父标签ID")]
        public int AdmColID { get; set; }

        [Display(Name = "排序编号")]
        public short OrderBy { get; set; }

        [Display(Name = "新窗口")]
        public bool IsOpenWin { get; set; }

        [Display(Name = "ID")]
        public int ID { get; set; }
    }

    //第二级分类
    public class TheSecondClassView
    {
        public TheSecondClassView()
        {
            TheSecondClasses = new List<TheSecondClassView>();
        }

        public List<TheSecondClassView> TheSecondClasses { get; set; }
        public string Name { get; set; }
        public string Url { get; set; }
        public int OrderBy { get; set; }
    }
}
